﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

using XRpgLibrary;
using XRpgLibrary.GraphicsClasses;
using XRpgLibrary.TileEngine;
using XRpgLibrary.ExtensionMethods;
using XRpgLibrary.Controls;

namespace XRpgLibrary.InterfaceClasses
{
    public class MainMenu : MenuBox, IGameDrawable, IGameUpdateable
    {
        
        public MainMenu(RpgGame game)
            : base(game)
        {
            ControlManager controls = new ControlManager(MenuFont);

            LinkLabel lbl1 = new LinkLabel();
            lbl1.Text = "Options";
            lbl1.TabStop = true;
            lbl1.HasFocus = true;
            lbl1.Selected += new EventHandler(lbl1_Selected);
                
            LinkLabel lbl2 = new LinkLabel();
            lbl2.Text = "Exit";
            lbl2.TabStop = true;
            lbl2.Selected += new EventHandler(lbl2_Selected);
            
            controls.Add(lbl1);
            controls.Add(lbl2);

            this.Enabled = true;

            Construct(controls);
        }

        void lbl2_Selected(object sender, EventArgs e)
        {
            Game.Exit();
        }

        void lbl1_Selected(object sender, EventArgs e)
        {
            //do nothing
        }
    }
}
